import { Component, OnInit } from '@angular/core';
import * as cfg from '../../common/configuration';
import { HotlineService } from '../hotline.service';
import { DynamicDialogConfig, DynamicDialogRef, SelectItem } from 'primeng/primeng';
import { MdlDialogService } from '@angular-mdl/core';

@Component({
    templateUrl: './hotline-search-dialog.component.html',
    styleUrls: ['./hotline-search-dialog.component.scss'],
    providers: [HotlineService]
})
export class HotlineSearchDialogComponent implements OnInit {
    zh = cfg.DATE_ZH_CN;
    searchCriteria: any = {};
    //考核序列
    kqSeq: SelectItem[] = [{ label: '', value: '' }, { label: '街道考核', value: 1 }, { label: '部门考核', value: 2 }];
    //承办单位
    unitNames: SelectItem[] = [];
    //派遣方式
    dispathTypes: SelectItem[] = [{ label: '', value: '' }, { label: '市级回访', value: '市级回访' }, { label: '区级回访', value: '区级回访' }];
    //回访状态
    feedBackTypes: SelectItem[] = [{ label: '', value: '' }, { label: '已回访', value: '已回访' }, { label: '未回访', value: '未回访' }];
    //问题解决
    finishedTypes: SelectItem[] = [{ label: '', value: '' }, { label: '已解决', value: '已解决' }, { label: '未解决', value: '未解决' }];
    //处理满意
    pleasedTypes: SelectItem[] = [{ label: '', value: '' }, { label: '满意', value: '满意' }, { label: '不满意', value: '不满意' }]
    constructor(
        private ref: DynamicDialogRef,
        private config: DynamicDialogConfig,
        private mdlDialogService: MdlDialogService,
        private hotlineService: HotlineService) {
            this.searchCriteria = config.data.searchCriteria;
    }

    ngOnInit() {
    }

    public cancel() {
        this.ref.close();
    }

    public save(){
        this.ref.close(this.searchCriteria);
    }
}